<?php
function smarty_function_friend($params, &$smarty)
{
	$intUserId 			= isset($params['id']) ? $params['id'] : 0;	
	$intTargetId		= isset($params['view']) ? $params['view'] : 0;	
	$objVfriendUser		= new Vfriend_User();
	$objUser			= $objVfriendUser->getFull($intUserId);	
	$intRelationType	= $objVfriendUser->getRelationType($intTargetId,$intUserId);
	$strToken			= $objUser->hex . '_' . $intTargetId;
	$smarty->assign('relationType',	$intRelationType);
	$smarty->assign('strToken', 	$strToken);
	$smarty->assign('objUser', 		$objUser);
	$smarty->display(ROOT_DIR . '/library/Vfriend/Plugins/Tpl/box-friend.tpl');
}
?>